﻿using System;

namespace RaytracerLib.Resamplers.Filters
{
    public class BoxFilter : Filter
    {
        public override string Name
        {
            get
            {
                return "Box";
            }
        }

        public BoxFilter()
            : base(0.5)
        { 
        }

        public override FilterType FilterType
        {
            get
            {
                return FilterType.Box;
            }
        }

        public override double Evaluate(double a_value)
        {
            if (a_value >= 0.5)
                return 0;
            if (a_value < -0.5) 
                return 0;

            return 1;
        }

        public override string ToString()
        {
            return "Box";
        }
    }
}